package com.yangfan.thread.thread_wangwenjun11;

public class QueryFromDBAction {


    public void execute() {
        try {
            Thread.sleep(1000L);
            String name = "Alex " + Thread.currentThread().getName();//从数据库内根据id查出来的 姓名
            ActionContext.getActionContext().getContext().setName(name);//把 姓名放到 ThreadLocal 里面
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
    }
}
